[PATCH] memfs_ll: fix deadlock in truncate operation
authorLong Li <leo.lilong@huawei.com>
Wed, 16 Jul 2025 01:54:07 +0000 (09:54 +0800)
committerLaszlo Boszormenyi (GCS) <gcs@debian.org>
Wed, 16 Jul 2025 17:27:21 +0000 (17:27 +0000)
commitc3b00452f4bdba32d73f38cff88b3b95e8ec2299
tree1026bac49cf9fc99f676e76caad0fdaab65d27d2
parent21a5c51ad27e076b38bb87b1b7b4da0c231393f5
[PATCH] memfs_ll: fix deadlock in truncate operation

Remove redundant mutex lock acquisition in the truncate() method to
prevent deadlock. The issue occurs when memfs_setattr() already holds
the mutex lock and then calls truncate(), which attempts to acquire
the same lock again.

Signed-off-by: Long Li <leo.lilong@huawei.com>
Gbp-Pq: Name memfs_ll-fix-deadlock.patch
example/memfs_ll.cc